
package trim.differentmaterials.algorithms;

import trim.*;
import trim.common.result.*;
import trim.common.inputdata.*;
import trim.differentmaterials.core.*;
import trim.differentmaterials.core.initializers.*;
import trim.differentmaterials.coefficients.*;
import trim.differentmaterials.generator.core.*;

/**
 *
 * @author Podorov Alexander
 */

public class Nrlm extends Trim
{
    public TrimResult solve(InputData inputData) throws NoSolutionsException
    {
        TrimCore core = new TrimCore(inputData);
        Coefficients coefficients = new NrlmCoefficients();
        core.setInitializer(new NrlmTrimCoreInitializer(core, coefficients));
        Generator generator = new Generator(core, coefficients);
        core.setGenerator(generator);
        core.startSymplexMethod();
        core.normalizePatterns();
        return core.getTrimResult();
    }

    public String getName()
    {
        return "NRLM (Near requires, less materials)";
    }

    public String getVersion()
    {
        return "1.0.0";
    }

    public String getDescription()
    {
        return "Раскрой нежесткого вектора требований из не более чем заданного количества материалов";
    }
}
